home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_313 / uucp / uucp1.lzh / man / Compress < prev    next >
Text File  |  1989-11-03  |  5KB  |  128 lines

  1.  
  2.      NAME
  3.       compress, uncompress, zcat - compress and expand data
  4.  
  5.       14compress             - 14 bit version of compress,
  6.                        takes less memory.
  7.  
  8.       NOTE: 'uncompress' and 'zcat' are the exact same executable
  9.       as 'compress', just renamed.  These 16 bit versions can also
  10.       uncompress files compressed with 14compress
  11.  
  12.      SYYNOPSIS
  13.       compress [ -f ] [ -v ] [ -c ] [ -V ] [ -bits ] [ name ... ]
  14.       uncompress [ -f ] [ -v ] [ -c ] [ -V ] [ name ... ]
  15.       zcat [ -V ] [ name ... ]
  16.  
  17.      DESCRIPTION
  18.       * SPECIAL NOTE, for UUCP distributions which do not contain
  19.         '14compress' but which do contain 'compress', the
  20.         'compress' is actually the 14 bit version, not the 16
  21.         bit version.
  22.  
  23.       Compress reduces the size of the named files using adaptive
  24.       Lempel-Ziv coding.  Whenever possible, each file is replaced
  25.       by one with the extension .Z , while keeping the same
  26.       ownership modes, access and modification times.  If no files
  27.       are specified, the standard input is compressed to the
  28.       standard output.  Compressed files can be restored to their
  29.       original form using uncompress or zcat.
  30.  
  31.       The -f option will force compression of name. This is useful
  32.       for compressing an entire directory, even if some of the
  33.       files do not actually shrink.  If -f is not given and
  34.       compress is run in the foreground, the user is prompted as
  35.       to whether an existing file should be overwritten.
  36.  
  37.       The -c option makes compress/uncompress write to the
  38.       standard output; no files are changed.  The nondestructive
  39.       behavior of zcat is identical to that of uncompress -c.
  40.  
  41.       Compress uses the modified Lempel-Ziv algorithm popularized
  42.       in "A Technique for High Performance Data Compression",
  43.       Terry A. Welch, IEEE Computer, vol. 17, no. 6 (June 1984),
  44.       pp. 8-19.  Common substrings in the file are first replaced
  45.       by 9-bit codes 257 and up.  When code 512 is reached, the
  46.       algorithm switches to 10-bit codes and continues to use more
  47.       bits until the limit specified by the -b flag is reached
  48.       (default 16).  Bits must be between 9 and 16.  The default
  49.       can be changed in the source to allow compress to be run on
  50.       a smaller machine.
  51.  
  52.       After the bits limit is attained, compress periodically
  53.       checks the compression ratio.  If it is increasing, compress
  54.       continues to use the existing code dictionary.  However, if
  55.       the compression ratio decreases, compress discards the table
  56.       of substrings and rebuilds it from scratch.  This allows the
  57.       algorithm to adapt to the next "block" of the file.
  58.  
  59.       Note that the -b flag is omitted for uncompress, since the
  60.       bits parameter specified during compression is encoded
  61.       within the output, along with a magic number to ensure that
  62.       neither decompression of random data nor recompression of
  63.       compressed data is attempted.
  64.  
  65.       The amount of compression obtained depends on the size of
  66.       the input, the number of bits per code, and the distribution
  67.       of common substrings.  Typically, text such as source code
  68.       or English is reduced by 50-60%.  Compression is generally
  69.       much better than that achieved by Huffman coding (as used in
  70.       pack), or adaptive Huffman coding (compact), and takes less
  71.       time to compute.
  72.  
  73.       Under the -v option, a message is printed yielding the
  74.       percentage of reduction for each file compressed.
  75.  
  76.       If the -V option is specified, the current version and
  77.       compile options are printed on stderr.
  78.  
  79.       Exit status is normally 0; if the last file is larger after
  80.       (attempted) compression, the status is 2; if an error
  81.       occurs, exit status is 1.
  82.  
  83.      DIAGNOSTICS
  84.       Usage: compress [-dfvcV] [-b maxbits] [file ...]
  85.           Invalid options were specified on the command line.
  86.       Missing maxbits
  87.           Maxbits must follow -b.
  88.       file: not in compressed format
  89.           The file specified to uncompress has not been
  90.           compressed.
  91.       file: compressed with xx bits, can only handle yy bits
  92.           File was compressed by a program that could deal
  93.           with more bits than the compress code on this
  94.           machine.  Recompress the file with smaller bits.
  95.       file: already has .Z suffix -- no change
  96.           The file is assumed to be already compressed.
  97.           Rename the file and try again.
  98.       file: filename too long to tack on .Z
  99.           The file cannot be compressed because its name is
  100.           longer than 12 characters.  Rename and try again.
  101.           This message does not occur on BSD systems.
  102.       file already exists; do you wish to overwrite (y or n)?
  103.           Respond "y" if you want the output file to be
  104.           replaced; "n" if not.
  105.       uncompress: corrupt input
  106.           A SIGSEGV violation was detected which usually means
  107.           that the input file has been corrupted.
  108.       Compression: xx.xx%
  109.           Percentage of the input saved by compression.
  110.           (Relevant only for -v.)
  111.       -- not a regular file: unchanged
  112.           When the input file is not a regular file, (e.g. a
  113.           directory), it is left unaltered.
  114.  
  115.       -- has xx other links: unchanged
  116.           The input file has links; it is left unchanged.  See
  117.           ln(1) for more information.
  118.       -- file unchanged
  119.           No savings is achieved by compression.  The input
  120.           remains virgin.
  121.  
  122.      BUGS
  123.       Although compressed files are compatible between machines
  124.       with large memory, -b12 should be used for file transfer to
  125.       architectures with a small process data space (64KB or less,
  126.       as exhibited by the DEC PDP series, the Intel 80286, etc.)
  127.  
  128.